#pragma once

#define WM_USERREGISTER (WM_USER + 102)

class CDlgReg : public CDialogImpl<CDlgReg>, public CWinDataExchange<CDlgReg>
{
public:
	enum { IDD = IDD_DLG_REGISTER };

	BEGIN_DDX_MAP(CDlgReg)
		DDX_TEXT(IDC_EDIT_EMAIL, m_strMail)
		DDX_TEXT(IDC_EDIT_NICKNAME, m_strNickName)
		DDX_TEXT(IDC_EDIT_PASS, m_strPassWord)
		DDX_TEXT(IDC_EDIT_PASSEX, m_strPassWordEx)
		DDX_TEXT(IDC_EDIT_REMARK, m_strRemark)
		DDX_TEXT(IDC_EDIT_COMPANY, m_strCompany)
	END_DDX_MAP() 

	BEGIN_MSG_MAP(CDlgReg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_USERREGISTER, OnRegister)
		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		COMMAND_HANDLER(IDC_COMBO_LOCAL_1, CBN_SELCHANGE, OnCbnSelchangeComboLocal1)
		COMMAND_HANDLER(IDC_COMBO_NATIVE_1, CBN_SELCHANGE, OnCbnSelchangeComboNative1)
		COMMAND_HANDLER(IDC_OK, BN_CLICKED, OnBnClickedOk)
		COMMAND_HANDLER(IDC_CANCEL, BN_CLICKED, OnBnClickedCancel)
	END_MSG_MAP()

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnCbnSelchangeComboNative1(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnCbnSelchangeComboLocal1(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnBnClickedOk(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnRegister(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnBnClickedCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);


public:
	_CSTRING_NS::CString m_strMail;
	_CSTRING_NS::CString m_strNickName;
	_CSTRING_NS::CString m_strPassWord;
	_CSTRING_NS::CString m_strPassWordEx;
	_CSTRING_NS::CString m_strGender;
	_CSTRING_NS::CString m_strNativeplace;
	_CSTRING_NS::CString m_strLocality;
	_CSTRING_NS::CString m_strBirthday;
	_CSTRING_NS::CString m_strVocation;
	_CSTRING_NS::CString m_strCompany;
	_CSTRING_NS::CString m_strRemark;	
	
	CComboBoxEx m_ctlGender;
	CComboBoxEx m_ctlNativeplace1;
	CComboBoxEx m_ctlNativeplace2;
	CComboBoxEx m_ctlLocality1;
	CComboBoxEx m_ctlLocality2;
	CComboBoxEx m_ctlVocation1;
	CComboBoxEx m_ctlVocation2;

	CDateTimePickerCtrl m_ctlDateTime;

	char m_szAddress[35][50][50];
	char m_szVocation[14][100];
};
